import { BaseDomain } from "@/common/domain/BaseDomain"
import { ApiProperty } from "@nestjs/swagger"
import { Transform } from "class-transformer"
import { IsNotEmpty, IsNumber, IsString, IsOptional } from "class-validator"
import { queryDomain } from "@/common/domain/queryDomain";
/**@description 查询front_accountDto */
export class QueryFrontAccountDto extends queryDomain {
      @ApiProperty({description:"id", required:false})
      @IsOptional()
      @Transform((v) => +v.value)
      @IsNumber()
      id: number | null
      @ApiProperty({description:"user_name", required:false})
      @IsOptional()
      userName: string | null
}
/**@description 创建front_accountDto */
export class CreateFrontAccountDto {
      @ApiProperty({description:"user_name", required:false})
      @IsOptional()
      @IsString()    
      userName?: string
      @ApiProperty({description:"password", required:false})
      @IsOptional()
      @IsString()    
      password?: string
      @ApiProperty({description:"nick_name", required:false})
      @IsOptional()
      @IsString()    
      nickName?: string
}
/**@description 更新front_accountDto */
export class UpdateFrontAccountDto {
      @ApiProperty({description:"id"})
      @IsNotEmpty({ message: "id不能为空" })
      @Transform((v) => +v.value)
      @IsNumber()
      id: number
      @ApiProperty({description:"user_name", required:false})
      @IsOptional()
      @IsString()    
      userName?: string
      @ApiProperty({description:"password", required:false})
      @IsOptional()
      @IsString()    
      password?: string
      @ApiProperty({description:"nick_name", required:false})
      @IsOptional()
      @IsString()    
      nickName?: string
}